home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
SCIENCE
/
PTCH_230.ZIP
/
PATCHIT.DOC
< prev
next >
Wrap
Text File
|
1993-12-16
|
54KB
|
962 lines
Patchit
The Manual
Introduction:
This manual describes the operation of the Patchit data
acquisition program. The current revision of this program is 2.30.
This software and manual are copyright 1993 through 1989 by George
B. Grant, Somerville, MA 02144.
Compatibilities:
Patchit runs on IBM PC compatible computer systems. It
operates entirely in graphics mode. As such, it requires a
compatible graphics display adapter. Patchit supports all major
display adapters (Hercules, CGA, EGA, VGA) and has drivers for
several other graphics display adapters including Super VGA.
Patchit works with a Microsoft compatible mouse.
Patchit is a data acquisition program. It therefore requires
a data acquisition card. Patchit should work with all cards in the
Data Translation DT2821 family (except the DT2829) and in
particular, has been thoroughly tested with both the DT2828 and
DT2821 data acquisition cards. Patchit also works with both the
Tecmar Labmaster and Labmaster DMA data acquisition cards. For
configuring these boards, see the appendix at the end of this
manual. As of this time, these are the only data acquisition
adapters supported by Patchit.
Starting Up:
Patchit runs entirely in graphics (not text) mode. In order
for it to run, a graphics driver for the graphics adapter that is
installed in the computer must be available in the directory in
which the Patchit executable file is. These drivers have the file
extension ".bgi". The drivers required for the following screen
types are as follows:
Display Adapter Display Driver
Hercules (Hercules Graphics Adapter) herc.bgi
CGA (Color Graphics Adapter) cga.bgi
EGA (Enhanced Graphics Adapter) egavga.bgi
VGA (Video Graphics Adapter) egavga.bgi
Super VGA svga16m.bgi
(Supports several common SVGA cards and the VESA standard
SVGA interface)
IBM 8514 Graphics Adapter ibm8514.bgi
AT&T 400-Line Graphics Adapter att400.bgi
3270 PC Graphics Adapter pc3270
By default, Patchit will automatically try to detect the
proper graphics driver for the computer. If the proper driver is
not found by Patchit (in the same directory as Patchit) when it is
started it will end with an error message. Otherwise the program
will start and Patchit's main screen will appear.
The Screen:
Patchit's main screen is divided into three areas. The menu
bar is on the top of the screen, it allows the user to access all
of Patchit's commands. The right-most portion of the menu bar
shows the amount of free conventional (real mode) memory available
for Patchit's use. The lower part of the screen shows the status
line. This line displays information about the current status of
the program (the amount of data sampled, the current parameter file
and the last data file saved). The data display area fills the
screen between the menu bar and the status line.
Help:
On-line help is available throughout Patchit. Just type the
F1 key and a relevant help message will pop up. The help file
"Patchit.hlp" must be in the same directory as the Patchit
executable file.
Accessing the Menus:
The menu bar has a series of pull down menus. A menu (e.g.
"File") can be accessed in a number of ways. 1) A menu can be
pulled down by clicking on the desired menu entry with the mouse.
2) A menu can be pulled down by holding down the ALT key while the
selection letter of the desired menu is typed (the selection letter
is usually the first letter of the word and is shown underlined and
in a different color from the rest of that word (unless the current
graphics display only supports two colors, or the color
configuration has been messed with)). For example, to pull down
the File menu, type ALT-F. 3) A menu can be pulled down by first
activating the menu bar with the F10 or "/" key. The file menu
will drop down, but not be selected. The selection letter of any
of the main menu items can then be typed in order to access that
particular menu.
Certain functions on the individual menus can be accessed
directly, without pulling down the menus, by typing a hot-key (the
hot-keys are shown to the left of a menu entry, on its menu). For
instance, the F7 key will cause Patchit to read a parameter file if
pressed when the menu bar is not activated.
The Menus:
File Menu:
Read Parameter File: Selecting this option allows the user to load
a new set of parameters into Patchit. The parameter sets determine
how stimulus will be generated and how data will be recorded.
Parameters are stored in files called "parameter files". If there
are parameter files in the current directory, a selection box will
appear listing the available parameter files. A parameter file may
be cursor selected from this box (with the mouse or keyboard) or
else the name of a parameter file may be typed in (do not type the
".prm" extension). To change directories, type the F2 key, or
click the left mouse button in the upper, directory, window and
type the pathname of the desired directory. The list of parameter
files will be updated for this new directory.
Write Parameter File: Selecting this option allows the user to
store the current parameter set to a parameter file. The name of
the parameter file should be typed without the extension ".prm"
(this is automatically appended by the program).
Save Data File: Selecting this options allows the user to save the
latest set of data that has been recorded. When the data is saved,
a complete copy of the parameters used to record this data is also
stored along with it. You must use this option to save the data
that you have just recorded. If you do not, then the data recorded
by Patchit will be overwritten the next time you acquire data with
Patchit. The only exception to this is if you have configured
Patchit to record data directly to your disk (see below,
File:Options:Record to Disk).
Options: Selecting this option allows the user to control several
very important aspects of Patchit's operation. These are:
Record to Disk: Selecting this toggles the state of this feature.
When this is enabled, Patchit will store each record as it is
acquired to a disk file. When you begin sampling data, Patchit
will prompt you for the name of the file into which the data will
be saved. Prior to writing each record to this disk file, Patchit
will check that there is sufficient disk space available. You will
be warned if there is not.
Comments in Files: Selecting this toggles the state of this
feature. When this is enabled, you will be prompted for a comment
when you save data to a disk file. The comment can be of any
length and is useful for recording pertinent facts about the data.
Okay: Selecting this causes any changes that you have made to the
state of these options to be saved.
Cancel: Selecting this causes any changes that you have made to
the state of these options to be discarded.
DOS Shell: When this is selected the user temporarily exits to DOS
to perform simple commands. In order to allow this, Patchit
"spawns" a copy of the DOS command interpreter. Note that Patchit
is still loaded in memory so there will be less DOS memory
available to execute a command. Type "EXIT" at the DOS command
line ("C:\>") to return to Patchit.
About: When this is selected another the user can find out about
Patchit.
Patchit: Selecting this causes information about Patchit to
appear. This information is the current revision level, a
copyright notice and information about its author (me!).
Memory: Selecting this causes information about the memory on your
computer and Patchit's use of it to appear. There are three types
of memory used by Patchit.
Conventional Memory: This is the memory used by all DOS real mode
programs, it is limited to a maximum of 640 Kilobytes (KB).
Patchit will show you the total amount of conventional memory on
your computer and the amount that is currently available.
XMS Memory: This is memory above the 1 Megabyte boundary that can
be accessed by Patchit if an XMS driver (such as Microsoft's
HIMEM.SYS) is loaded. XMS memory allows Patchit to store a great
deal of data without filling up the DOS (conventional) memory area.
If XMS is available Patchit will store acquired data in it unless
you have disabled this feature (see below, Config:Other Options:XMS
Data Storage).
Disk Memory: This is the memory available on the disk. Patchit
shows the total disk space and the available amount on the current
disk.
Okay: Selecting this closes this menu.
Quit Program: Selecting this allows the user to exit Patchit.
Display Menu:
Clear Screen: Selecting this causes all data display windows to be
cleared.
Refresh: Selecting this causes any data that has been recorded by
Patchit to be redisplayed in the data display windows. Data
recorded on channels that have not been enabled for display will
not be displayed. If you have recorded data directly to the disk
(see above, File:Options:Record to Disk) then Patchit will not be
able to refresh the screen.
Parameters: Selecting this causes Patchit to display some of the
currently selected parameters. This does not show all of the
parameters in effect and is in need of work.
Windows: When this option is selected the user is prompted for the
number of display windows that will subdivide the data display
area. Up to four such windows may be used. If more than one is
selected the screen will clear and the user can then specify the
layout of these windows. Lines in the data display area show the
limits of the windows and can be moved about with the cursor keys
or mouse. Typing the space bar causes the layout/orientation of
the windows to be changed. When you are satisfied with the layout,
hit the Enter key. Windows are number in ascending order from left
to right and top to bottom.
Note: If the user decreases the number of windows, then any data
that was configured to have been displayed in a window that no
longer exists (greater than the number of windows) will be
displayed in window 1.
Sample Menu:
Go: Selecting this causes Patchit to begin acquiring data.
Stimuli will be generated on any enabled output channels and data
will be acquired on any enabled input channels. Simultaneously.
This process may be interrupted by hitting a key.
Continue: Selecting this causes Patchit to begin acquiring data
from the record at which it had been previously interrupted. The
user has the option of continuing from a record earlier than that
at which data acquisition was previously interrupted. That is, if
you interrupted the data acquisition cycle after record #8 because
of a big glitch in the recording (due to a power line spike of
course) you could continue recording at record #6, overwriting
records 6 - 8 with new data.
Number of Records: Selecting this allows the user to specify the
number of records that Patchit will record. Patchit records data
in blocks that are called "records". A record can contain multiple
channels of data. The number of records is limited to ~64000, but
is effectively limited by memory. If you select a value and
Patchit finds that there is insufficient memory on your computer,
then Patchit will complain and reset the value. If you need to
record such large amounts of data, you should enable
File:Options:Record To Disk (and have a big disk).
Length of Record: Selecting this option allows the user to specify
the length of a record (in milliseconds). Each record is limited
in size to a maximum of ~32000 points. The number of points is
equal to ((the number of input channels) * (the length of the
record)) / (the sampling rate). The number of points in the record
is shown under Display:Parameters. If you choose a value for the
length of the record that exceeds the maximum number of points
allowable, or the amount of memory available, Patchit will complain
and reset the value. You will need to choose a shorter record
length, a greater sampling interval or fewer channels of input.
Clock Period: Selecting this option allows the user to specify the
sampling interval at which Patchit will record data (in
milliseconds). This value plays a role in determining the size of
the record and is limited (see Length of Record, above). If you
choose too small a value, Patchit will complain and reset the
value. If this happens, choose a larger value, decrease the record
length or decrease the number of input channels.
Note: Due to the design of certain data acquisition boards, under
certain conditions Patchit may use a smaller sampling interval than
you have selected. This should not affect the size of the memory
block described above, but the sampling interval could be smaller
than the board could handle. This could cause the program to lock
up, a full computer reboot might then be necessary. Always test
your parameter files before using them for critical recording
sessions!
Delay Time: Selecting this option allows the user to specify the
delay time (in seconds) between recording sessions. This value is
the amount of time the program waits between each record. During
data acquisition cycles, this value is counted down on the screen.
A value of 0 will NOT cause the records to be acquired immediately
after each other. There is a small amount of overhead time that
Patchit requires between each data acquisition cycle.
Output: Selecting this option allows the user to control aspects
of the output channels available for use to Patchit. There are
entries on this menu for all of the available output channels.
These can be up to 15 analog outputs (D/A converters) and one
binary output consisting of 14 separate TTL outputs. The exact
number of outputs depends on your specific data acquisition board.
Selecting a specific output from this menu allows you to control
aspects of this output, and importantly, whether this output is
enabled for use during data acquisition. An output will only be
used during a data acquisition cycle if it is enabled here.
Specifying outputs waveforms is described on the Sample:Stimulus
menu, below. The values on the right side of this menu describe
some of the settings in effect for that output. For analog outputs
("X Output X"), the enabled/disabled state of the output is shown,
and the default (holding) voltage on that output. For binary
outputs, the enabled/disabled state of the output is shown, and the
default binary output, shown in hexadecimal. This corresponds to
the binary state of the 14 individual TTL outputs.
X Output X: Selecting this option allows the user to control
settings for this analog output (D/A converter) channel.
Use Channel: Selecting this toggles the enabled/disabled state of
this output. An output will only be used during a data acquisition
cycle if it is enabled here.
V Hold (Vh): Selecting this allows the user to set the default
(holding) voltage on this output. The voltage is specified in
millivolts and is emitted on this output at all times (except
during data acquisition, if the channel is enabled for output).
Note that values entered for the stimulus descriptors (see below,
Sample:Stimulus:D/A Channel X) are absolute values and are not
relative to this holding potential.
Attenuation: Selecting this option allows the user to set the
attenuation factor for the analog output. This value allows
Patchit to correctly set it's analog outputs to the proper values
which correspond to those needed at the external hardware (e.g. an
amplifier). The value entered here is the factor by which
Patchit's output will be divided in order to compensate for any
attenuation or amplification at the external hardware. For the
Dagan model 8900 amplifier which has a command potential input
which can be scaled by -10:1 or -20:1, the value entered into
Patchit would be -10 or -20 for these two scale factors,
respectively. Generally you should use the largest attenuation
factor you can use in order to scale down any noise which might
enter your amplifier riding on the command voltage. In my case,
using the -20:1 attenuation factor yields an effective command
voltage range at the amplifier of +/- 500 mV (for a board with D/A
converters with a range of +/- 10 V, attenuated by a factor of 20).
This value is critical and MUST be properly set in order for
Patchit to output accurate voltages.
Okay: Selecting this causes any changes that you have made to the
state of this analog output to be saved.
Cancel: Selecting this causes any changes that you have made to
the state of this analog output to be discarded.
Binary Output: Selecting this option allows the user to control
the settings for the binary (TTL) output.
Use Channel: Selecting this toggles the enabled/disabled state of
the binary output. The binary output will only be used during a
data acquisition cycle if it is enabled here.
Default Outs: Selecting this option allows the user to set the
default binary output state. This is expressed as a 14 bit
hexadecimal value. Each bit in this hexadecimal value corresponds
to the default logic state of the 14 TTL outputs. In most cases
these outputs will be zero (0) unless you have a device whose
trigger uses negative logic (i.e. a falling edge trigger).
Okay: Selecting this causes any changes that you have made to the
state of the binary outputs to be saved.
Cancel: Selecting this causes any changes that you have made to
the state of this binary outputs to be discarded.
Okay: Selecting this causes any changes that you have made to the
state of the outputs to be saved.
Cancel: Selecting this causes any changes that you have made to
the state of the outputs to be discarded.
Inputs: Selecting this option allows the user to control aspects
of the channels of input used during a data acquisition cycle. The
items on this menu correspond to the available input channels (up
to 16, depending on your data acquisition board). Selecting an
input from this menu allows you to control aspects of that input,
and importantly, whether this input is enabled. During data
acquisition, data will only be recorded on an input if it is
enabled here. The values on the right side of this menu describe
some of the settings in effect for this input. The
enabled/disabled state of the input is shown, and if enabled, a
code is shown which summarizes the display settings for this input.
There are five characters between parentheses, they are, (in the
order they appear): 'D' = data will be displayed. '1',2','3' or
'4' = The window number in which the data will be displayed. '^'
= the data will be displayed inverted. '*' = the displayed data
will be scaled (multiplied) by some factor. '+' = the displayed
data will be vertically offset by some factor. If any of these
display options are not in effect, the corresponding character will
not be shown.
Note: Due to the design of certain data acquisition boards, under
certain conditions Patchit may have to temporarily use more input
channels than you have selected. These unwanted channels will be
stripped away once the data has been recorded, but can have two
effects. 1) The amount of memory available for a data acquisition
cycle may be reduced. 2) The increased number of channels may
cause the sampling interval used to be smaller than you have
selected. This sampling interval could be smaller than the board
could handle. This could cause the program to lock up, a full
computer reboot might then be necessary. Always test your
parameter files before using them for critical recording sessions!
X Input X: Selecting this item allows the user to control the
settings for this input.
Recording: Selecting this toggles the enabled/disabled state of
this output. Data will be recorded on an input during a data
acquisition cycle only if it is enabled here. Enabling/disabling
an input will also automatically turn on display of this data - you
can turn this off below.
Type: This allows the user to set the type of data that is on this
channel. This can be set to indicate that the data represents
either current or voltage.
Gain: This allows the user to set how Patchit will handle the gain
for this data. Four options are available.
Not Set in Patchit: Selecting this indicates that the gain will
not be set by Patchit for this data. If this gain option is set
for this channel and data on this channel is saved to a file and
then loaded into a data analysis program, the data analysis program
will have to prompt you for the gain. It is usually advantageous
to set the gain in Patchit, using one of the other gain modes.
Set Gain Right Now: Selecting this causes Patchit to prompt you
for the gain right now. This gain mode is best suited for
circumstances in which the gain on an input is not likely to vary
often.
Prompt for Later: Selecting this causes Patchit to prompt you for
the gain on this input channel when the data is saved to file.
This gain mode is best suited for circumstances in which the gain
might change frequently.
Read from A/D Chan: Selecting this causes Patchit to prompt you
for the A/D channel from which automatic gain recordings will be
made. This is presently hard-configured for my Dagan 8900
amplifier. It has 7 gain settings -1000, -500, -200, -100, -50,
-20, -10 (with the 1G headstage) - these 7 gains generate a signal
of 0.5, 1.0, 1.5, 2.0, 2.5, 3.0 and 3.5 Volts on the gain output.
When this gain mode is active, Patchit will read the voltage from
the selected A/D gain channel prior to each data acquisition cycle.
This gain mode is best suited for amplifiers which have an
automatic gain sender unit.
Display: Selecting this toggles the enabled/disabled state for
whether or not data on this channel will be displayed. Data can
only be displayed if this channel is enabled for input (obviously).
Window: This allows the user to select in which of up to four
windows data on this channel will be displayed. If more than one
such window is available then the user will be prompted for the
window number to display the data in. Windows are set up using
Display:Windows, above.
Note: If data on a given channel is configured to be displayed in
a given channel, and the user then decreases the number of windows
(see Display:Windows), then any data that was to have been
displayed in a window that no longer exists (greater than the
number of windows) will be displayed in window 1.
Invert: Selecting this toggles the enabled/disabled state for
whether or not data on this channel will be displayed inverted
(upside-down). This feature has been implemented for amplifiers
(such as the Dagan 8900) that have a signal that is inverted (i.e.
upside-down) relative to the desired convention for that signal.
If a channel of data is configured to be displayed inverted, then
ONLY the display of this data will be inverted. The raw data is
recorded as it is sampled from the analog signal. If you need to
invert a channel for display, then the gain at which this data was
recorded should be a negative value.
Scale Factor: Selecting this causes Patchit to prompt you for a
value by which to scale (multiply) the displayed data. This
setting affects only the display of the data, the raw data is
unaffected. Inverting the display of a channel could also be done
here by setting this value to -1, but setting invert (above) would
cause the display to be faster.
Offset: Selecting this causes Patchit to prompt you for a value by
which to offset vertically the displayed data. This value is in
the range +1.0 to -1.0. +1.0 causes the data to be drawn offset
upward by half the display height, -1.0 causes the data to be drawn
offset downward by half the display height, and 0.0 causes the data
to be drawn as it is recorded. Intermediate values cause
intermediate offsets. This value affects only the display of the
data, the raw data is unaffected.
Okay: Selecting this causes any changes that you have made to the
state of this input to be saved.
Cancel: Selecting this causes any changes that you have made to
the state of this input to be discarded.
Okay: Selecting this causes any changes that you have made to the
state of the inputs to be saved.
Cancel: Selecting this causes any changes that you have made to
the state of the inputs to be discarded.
Stimulus: Selecting this option allows the user to control the
output stimulus waveform(s) during data acquisition. Patchit
controls two different types of outputs, analog (D/A) and binary
(TTL). The stimuli that can be generated on these channels are
different and will be described separately. Selecting one of the
options on this menu allows the user to specify the output waveform
for the selected channel. If the output channel for which you wish
to describe the waveform is not enabled, you will be warned.
Output waveforms are described by events, these events
can occur at any time during the data acquisition cycle. Existing
events occurring on this output channel are listed in chronological
order, in a box shown at the bottom of the screen. Events may be
added to, changed, or deleted from this list using the menu.
Events are described by event descriptors. The event descriptors
are different for analog and binary outputs.
X (D/A) Channel X: This allows the user to configure the analog
output waveform for this output channel. If this channel is not
enabled for output, you will be warned. It can be turned on using
Sample:Outputs:X Output X:Use Channel. The event descriptor
control menu has five items:
Add Event: This allows the user to add an event to the event list
(and thus to the output waveform on this channel). The event will
be added to the list in its proper chronological order.
Change Event: This allows the user to change an existing event in
the event list (and thus the output waveform on this channel). The
user will be prompted for which event to change.
Both Add Event and Change Event bring up the event menu:
Format: An event can be either a step or a ramp. A step is an
instantaneous (well, as good as the hardware can do) change in the
output state at the given time. A ramp causes the output to change
state in a linear or ramp-like fashion starting at the given time.
The next two items on this menu differ depending upon the format
for the event that is selected:
For Step events the next two items are:
Level: The voltage (in millivolts) to which the output is stepped
at the time of the event.
Incmt: The voltage increment (in millivolts) by which the output
voltage is changed during each successive data acquisition cycle
(record).
For Ramp events the next two items are:
Level, Starting: The voltage (in millivolts) at which the ramp
starts at the time of the event.
M = Slope: The slope (in millivolts/millisecond) of the ramp.
Time: The time (in milliseconds) at which the event is to occur.
Delta T: The increment (in milliseconds) by which the time of the
event is shifted during each successive data acquisition cycle.
Okay: Selecting this causes any changes that have been made to
this event to be saved.
Cancel: Selecting this causes any changes that have been made to
this event to be discarded.
Delete Event: This allows the user to delete an event from the
event list (and thus from the output waveform for this channel).
The user will be prompted for which event to delete.
Erase All Events: This allows the user to delete all events in the
event list (and thus the output waveform for this channel). If
this channel is enabled for output and there are no events for it,
then the output will be the default output voltage (set by
Sample:Outputs:X Output X:V Hold Vh).
Okay: This exits the event descriptor control menu for this output
channel.
Binary Output: This allows the user to configure the output
waveforms for the binary output. If the binary output channel is
not enabled for output, you will be warned. It can be turned on
using Sample:Outputs:Binary Output:Use Channel. The event
descriptor control menu has five items:
Add Event: This allows the user to add an event to the event list
(and thus to the binary output waveform). The event will be added
to the list in its proper chronological order.
Change Event: This allows the user to change an event in the event
list (and thus the binary output waveform). The user will be
prompted for which event to operate upon.
Both Add Event and Change Event bring up the event menu:
Hex value: This is the value in hexadecimal (up to 3FFF) which is
to be output on the binary port at the time of the event. Each of
the up to 14 TTL outputs are controlled by a bit from this value.
To output the logic level "1" on binary channel 0, the value in
hexadecimal is 1. To output the logic level "1" on binary channel
1, the value in hexadecimal is 2. Oh, go look up hexadecimal
numbers somewhere else.
Time: The time (in milliseconds) at which the event is to occur.
Delta T: The increment (in milliseconds) by which the time of the
event is shifted during each successive data acquisition cycle
(record).
Okay: Selecting this causes any changes that have been made to
this event to be saved.
Cancel: Selecting this causes any changes that have been made to
this event to be discarded.
Delete Event: This allows the user to delete an event from the
event list and thus from the binary output waveform. The user will
be prompted for which event to delete.
Erase All Events: This allows the user to delete all events in the
binary output's event list (and thus the binary output waveform).
If the binary output is enabled for output and there are no events
for it, then each of the individual TTL outputs will be set to its
default (TTL) value (this is set by Sample:Outputs:Binary
Output:Default Outs).
Okay: This exits the event descriptor control menu for the binary
output.
Okay: This exits the Stimulus control menu.
Pulse Generator Menu:
Go: Selecting this causes Patchit to begin acquiring data in
"pulse generator" mode. In this mode, stimulus will be generated
on one enabled output channels and data will be acquired on one
input channel. Simultaneously. This process may be interrupted by
hitting the space bar or the ESC key. The analog output for this
function is constrained to a simple square voltage pulse on the
selected output channel. The pulse width is set at one half of the
length of the record (see below). The voltage pulse is preceded
and anteceded by a time equal to one quarter of the length of the
record (the pulse has a 50% duty cycle). While the pulse generator
is active, the menu bar displays the amplitude of the current pulse
and the range of pulse voltages that can be selected with the
function keys. The initial amplitude of the pulse is +10 mV. This
can be changed by using the function keys. Pressing any of the
keys from F1 to F10 causes the amplitude of the pulse to be changed
on the next pulse to a voltage from +10 mV to +100 mV (F1 = 10mV,
F2 = 20mV, F3 = 30mV...). ALT, CTRL and SHIFT modify the range of
voltages that can be selected with the function keys. SHIFT-F1
through SHIFT-F10 generate pulses from -10 mV to -100 mV, in -10 mV
increments. ALT-F1 through ALT-F10 generate pulses from +50 mV to
+500 mV in +50 mV increments. CTRL-F1 through CTRL-F10 generate
pulses from -50 mV to -500 mV in -50 mV increments. Typing the "0"
(zero) key causes the pulse to have an amplitude of 0 mV.
Length of Rec: Selecting this option allows the user to specify
the length of the record (in milliseconds) used for the pulse
generator. This is the duration of the each pulse generator cycle,
the pulse width is one half of this duration. Data recorded during
the pulse generator cycle is stored in blocks known as records.
Each record is limited in size to a maximum of ~32000 points. The
number of points is equal to (the length of the record) / (the
sampling rate). If you choose a value for the length of a pulse
generator cycle that exceeds the maximum number of points or amount
of memory, Patchit will complain and reset this value. You will
need to choose a shorter event length or a greater sampling
interval.
Clock Period: Selecting this option allows the user to specify the
sampling interval (in milliseconds) at which data is recorded
during a pulse generator cycle. This value plays a role in
determining the size of the memory block allocated and is limited
(see Length of Record, above). If you choose too small a value,
Patchit will complain and reset the value, if this happens, choose
a larger value or decrease the length of the pulse generator cycle.
Note: Due to the design of certain data acquisition boards, under
certain conditions Patchit may use a smaller sampling interval than
you have selected. This should not affect the size of the memory
block described above, but the sampling interval could be smaller
than the board could handle. This could cause the program to lock
up, a full computer reboot might then be necessary. Always test
your parameter files before using them for critical recording
sessions!
Delay Time: Selecting this option allows the user to specify the
delay time (in seconds) between pulse generator cycles. This value
is the amount of time the program waits between each cycle. A
value of 0 here will NOT cause the records to be acquired
immediately after each other. There is a small amount of overhead
time that Patchit requires between each pulse generator cycle.
Output Channel: Selecting this option allows the user to specify
the channel that will be used for output during a pulse generator
cycle. It is on this channel that the voltage pulse will be
generated when Pulse Generator:Go is selected.
Input Channel: Selecting this option allows the user to specify
the channel that will be used for input during a pulse generator
cycle. It is on this channel that analog data from an experimental
preparation will be acquired and displayed.
Note: Due to the design of certain data acquisition boards, under
certain conditions Patchit may have to temporarily use more input
channels than you have selected. These unwanted channels will be
stripped away once the data has been recorded, but can have two
effects. 1) The amount of memory available for a pulse generator
cycle may be reduced. 2) The increased number of channels may
cause the sampling interval used to be smaller than you have
selected. This sampling interval could be smaller than the board
could handle. This could cause the program to lock up, a full
computer reboot might then be necessary. Always test your
parameter files before using them for critical recording sessions!
Config Menu:
Hardware Config: Selecting this option allows the user to specify
the type of data acquisition board in use and its configuration.
When this option is selected a menu appears and the user can select
among the data acquisition boards that Patchit supports. At
present there are two families of boards that are supported, the
Data Translation DT2821 series and the Tecmar Labmaster series.
The user also has the option of selecting "No Board", this allows
you to try out Patchit on a computer that has no data acquisition
board installed. When one of these board families is selected,
another menu appears from which the user can select the specific
type of board that is installed the hardware settings of that
board. These options are described further below:
Family Member: Selecting this option allows the user to specify
the exact type of data acquisition board that is installed in the
computer. This selection allows Patchit to take advantage of the
features of that specific board (i.e. number of input channels
etc.).
Base Address: Selecting this option allows the user to specify the
base address (in hexadecimal) of the data acquisition board that is
installed. It is imperative that this value match that on the
board (see your board's manual). If it is incorrectly set, Patchit
will be unable to communicate with the board.
DMA Channel(s): Selecting this option allows the user to select
the DMA channel(s) that the program and hardware will use. Again,
the value selected here must match the configuration of the board.
Note: At present the second DMA channel is NOT used by Patchit for
the DT2821 series boards and DMA is not used at all for Tecmar
Labmaster series boards (even the Labmaster DMA..., yes, I know, I
know...).
Interrupt: Selecting this option allows the user to select the
interrupt channel that the program and hardware will use. This
value should match the configuration of the board.
Note: This setting doesn't matter since Patchit doesn't use this
interrupt presently.
A/D Format: (Labmaster Only) Selecting this option allows the user
to specify the data format used by the data acquisition board for
it's A/D converter. This can be either Two's Complement or Binary.
This value must match the configuration of the board. The default
format for Patchit (and Tack) is two's complement.
Trigger Src: Selecting this option allows the user to specify
whether Patchit will use an internal or an external trigger. For
internal trigger (the normal mode), Patchit will start its own data
acquisition cycle. In order for this to work properly on the
DT2821 series boards the Binary Output 1, Channel 7 must be
connected to the External Trigger input. For external trigger, a
falling-edge TTL trigger will start the data acquisition cycle.
For a DT2821 series board, the trigger should be applied to the
external trigger input. For a Tecmar Labmaster the trigger pulse
should be applied to the binary input port B, Bit 2 (B2).
Okay: Selecting this causes any changes that have been made to the
configuration of the data acquisition board to be saved.
Cancel: Selecting this causes any changes that have been made to
the configuration of the data acquisition board to be discarded.
Graphics Display: Selecting this option allows the user to specify
the type of graphics display installed and the display resolution
that Patchit should use. Normally, the graphics autodetect setting
should be used. For a given display type to be used, the requisite
display driver file (they have the extension ".bgi") MUST be
present in the same directory as Patchit.
Display Type: Selecting this option allows the user to select a
graphics display type. Twelve settings are available.
Note: If your computer does not support the display type that you
have selected, you may well crash the program when you try to
switch display types.
Resolution: Selecting this option allows the user to select a
display resolution for the selected display type. Note that some
display types have only one available resolution.
Note: If your computer's display adapter does not support the
resolution that you have selected, you may well crash the program
when you try to switch display resolutions.
Okay: Selecting this option causes any changes that have been made
to the graphics display type and resolution to go into effect.
Cancel: Selecting this option causes any changes that have been
made to the graphics display type and resolution to be cancelled.
Colors: When this option is selected a color demonstration window
appears and a menu appears from which the user can select the
colors of the various components of the Patchit screen. The
various components are the menu bar, status line, popup boxes and
data window. For menus, the user can control the background, text,
frame and select letter colors. For the status line, the user can
control the background and text colors. For popup boxes, the user
can control the background, text and frame colors. For the data
window, the user can control the background, frame and axis colors
as well as the colors for all available channels of data.
Menus:
Status Line:
Popup Boxes:
Data Window:
When the user selects one of these menu options, another menu
appears from which the user can select the color for the elements
of the windows (i.e. frame color of popup window). Clicking on an
element will select the next available color for that element, this
will be shown in the color demonstration window. Typing the select
letter of that element will do the same. Holding the SHIFT key
down while typing the select letter of that element will select the
previous color for that element. Select Okay when you are done
setting the colors.
Use Defaults: When this option is selected, the colors of all of
the elements of the Patchit display revert to their default
settings.
Okay: Selecting this option causes any changes that have been made
to the color scheme to go into effect.
Cancel: Selecting this option causes any changes that have been
made to the color scheme to be cancelled.
Font: Selecting this option allows the user to specify the font
that will be used by Patchit. For all but the default font, the
requisite font file (they have the extension ".chr") MUST be
present in the same directory as Patchit. An example of some text
written in the selected font is displayed.
Font: Selecting this option allows the user to select the font
family that will be used by Patchit. Eleven font families are
available. The default font is a bit-mapped font, the others are
stroked (outline) fonts.
Height: Selecting this option allows the user to set the height of
the font that will be used by Patchit. If the selected font family
is the default, bit-mapped font, the height and the width must be
the same.
Width: Selecting this option allows the user to set the width of
the font that will be used by Patchit. If the selected font family
is the default, bit-mapped font, the height and the width must be
the same.
Okay: Selecting this option causes any changes that have been made
to the font to go into effect.
Cancel: Selecting this option causes any changes that have been
made to the font to be cancelled.
Sounds: Selecting this option allows the user to control aspects
of the sounds that Patchit generates during its operation. These
are described below:
Sounds: Selecting this option toggles the state of whether Patchit
will generate sounds. When this is disabled Patchit will make no
noise.
Type: Selecting this option allows the user to select the type of
sound generation that Patchit will use, these are:
Single Tone: Patchit will always generate a tone of the specified
frequency and duration (see below) for each data acquisition cycle.
Rising Scale: When the first record is acquired, Patchit will
generate a tone of the specified frequency and duration. For the
next and each succeeding record, the tone generated will be of a
successively higher frequency.
From A/D: Patchit will generate a tone for each record based on
the value of a portion of the data. When this is option is
selected the user is prompted for the channel of data from which to
record the value and is then prompted for a value from 0 to 1.
This value tells Patchit from where in the record (0 is beginning,
1 is end) to read the value of the data on which to base the sound.
Frequency: Selecting this option allows the user to specify the
frequency (in Hz.) of the tone. If the sound type is "Single
Tone", this is the frequency of that tone. If the sound type is
"Rising Scale", this is the frequency generated for the first
record. If the sound type is "From A/D", this is the frequency of
the lowest A/D value, for this sound type, the user is also
prompted for a frequency corresponding to the highest A/D value.
Duration: When this option is selected the user is prompted for
the duration (in msec) of the tone.
Test: When this option is selected, Patchit demonstrates the tones
that will be generated during given the currently selected options.
If the tone type is "From A/D", the demonstration plays the high
and low frequency values over and over.
Okay: When this option is selected, you leave the sounds menu.
Display Options: Selecting this option allows the user to control
aspects of how data is displayed on the screen.
Show all pts in record: If this is enabled then Patchit will
display all of the data points for a given record on the screen.
That is, if there are more data points in a record than there are
pixels on the screen horizontally then Patchit will show multiple
Y points for each X point. If this is disabled then Patchit will
only display one Y point for each X point. Disabling this feature
causes the display to draw faster.
Connect the points: If this is enabled then Patchit will connect
the data points on the screen with lines. This causes the display
of data to look nicer, but significantly slows the display of data.
Auto-Erase (Storage): If this is enabled then the screen will
automatically be cleared whenever data is acquired or whenever the
pulse generator is activated. If this is disabled, then the screen
will not be cleared in either of these cases.
Grid and Axes: Selecting this option allows the user to configure
how the grid and axes in the data window(s) are displayed. There
are five items on this menu:
X Axis: Selecting this option allows the user to specify where X
axes are to be placed in each data window. The user can select a
variety of X axes varying from none to three, appearing at the
top, middle and bottom of each window.
Y Axis: Selecting this option allows the user to specify where Y
axes are to be placed in each data window. The user can select a
variety of Y axes varying from none to three, appearing at the
left, middle and right of each window.
Grid: Selecting this option allows the user to specify the
appearance of the grid in the data window(s). The grid can be
horizontal, vertical, both horizontal & vertical or neither. The
spacing of the grid is determined by the number of divisions (see
next item).
Division: Selecting this option allows the user to specify the
number of divisions for both the X and Y axes. The number of
divisions determines where the ticks are placed on the X and Y axes
and the spacing of the grid.
Line Style: Selecting this option allows the user to specify the
line style for the grid. The line style is specified by a
hexadecimal number (0 -> FFFF) which specifies how the line is
displayed. FFFF corresponds to a solid line, while 0 corresponds
to no line. A value of 0F0F would make a dashed line, while 1
would make a faintly dotted line.
Okay: Selecting this option exits the display options menu.
Other Options: Selecting this option allows the user to control
several very important aspects of Patchit's operation. These are
described below:
XMS Data Storage: Enabling this feature allows Patchit to use
memory accessed via the XMS specification in order to store data
acquired before writing it to disk. XMS memory is memory above the
1 MB boundary on PC-AT class computers (80286 and above class
microprocessors). This memory can only be accessed if you have
installed the XMS driver HIMEM.SYS (supplied free of charge by
Microsoft), or a compatible XMS driver (e.g. Desqview's QEMM memory
manager) in your config.sys file. The use of XMS allows Patchit to
store data above the conventional memory area, which allows more
room for Patchit to work. This feature need not be disabled unless
you suspect a problem or else have other needs.
Startup Prm File: Selecting this option allows the user to specify
the name of a parameter file to load whenever Patchit is started.
This feature allows the user to load a customized parameter set at
startup. If this file is not available at startup, Patchit will
use a default set which may not be correct for your experimental
configuration! (in particular the Output Scaling will almost
certainly be wrong).
Okay: Selecting this causes any changes that have been made to the
items on this menu to be saved.
Cancel: Selecting this causes any changes that have been made to
the items on this menu to be discarded.
Write Config File: Selecting this option causes the current
configuration data to be written to the Patchit.cfg configuration
file. Only the items that are on controlled by config menu are
stored in this file. These are:
- Hardware Settings (type of board and hardware configuration)
- Graphics display adapter & resolution
- Colors
- Font
- Sounds
- Display Settings (Show All Pts, Connect the Pts, Auto-Erase,
Grid)
- XMS Usage
- Start Up Parameter File
All other user-controllable parameters are stored in the
individual parameter (prm) files. These values will thus be set to
the value stored in the parameter file whenever a new one is
loaded. Of these parameters, one of the most critical (I stress
again) is the Output Scaling factor. Please confirm that this
value is set properly in all of the parameter files which you use.
However, it may be that you would desire different output scaling
values for different parameter files, so that is why this value is
stored in the parameter file and not the configuration file.
Conclusion
I hope that you understand all of the features that I have
described here and that Patchit serves you well. I would
appreciate your comments on the program and manual. I always want
to know about bugs in my program and will endeavor to fix them as
speedily as is possible. I am not responsible for any loss of data
or damage caused by this program. I also would value your
suggestions for new features and ways to improve this program. I
can be reached at the following addresses:
George B. Grant (617) 625-2419 (Home Phone)
38 Banks St. #2 (617) 495-2599 (Work Phone)
Somerville, MA 02144
ggrant@husc.harvard.edu (e-mail)
george@mander.berkeley.edu (e-mail)
72722,3152 (Compuserve address)
Appendix:
Hardware Configuration:
Data Translation DT2821 Family Boards:
Analog Outputs: Patchit uses both Analog Outputs on the DT2821.
Analog Inputs: Patchit uses all analog inputs on the DT2821. Note
the weird channel sequence used for DT2821 family boards with less
than 16 inputs!
Binary Outputs: Patchit uses the two Binary Output ports on the
DT2821 for binary (TTL) trigger outputs. Two of these are put to
special use by Patchit. Binary Output Port 1, Channel (bit) 7 and
Binary Output Port 1, Channel (bit) 6, go to logic low and logic
high, respectively, at the beginning of a record and return to
logic high and logic low, respectively, at the end of a record.
These are useful for triggering oscilloscopes.
Triggering: If you do not need an external trigger, you should
connect the DT2821's external trigger input to Binary Output Port
1, Channel (bit) 7. This will allow Patchit to operate properly.
If you plan to use an external trigger, it should be connected to
the external trigger input (instead of Binary Output Port 1,
Channel 7).
Tecmar Labmaster Family Boards:
General: The following connections must be made for Patchit to
operate properly:
Source5-Out5-Start Convert
Gate5-Out4
Analog Outputs: Patchit uses both Analog Outputs on the Tecmar
Labmaster.
Analog Inputs: Patchit uses all analog inputs on the Tecmar
Labmaster.
Binary Outputs: Patchit uses two of the Parallel I/O ports on the
Tecmar Labmaster for binary (TTL) trigger outputs. These are Ports
C and A. Patchit numbers these binary outputs from 0 to 15.
Patchit outputs 0-7 correspond to Port A, bits 0-7 and Patchit
outputs 8-15 correspond to Port C, bits 0-7. Two of these binary
outputs are put to special use by Patchit. Outputs 15 and 14 (C7
and C6) go to logic low and logic high, respectively, at the
beginning of a record and return to logic high and low,
respectively, at the end of a record. These are useful for
triggering oscilloscopes.
Note: If you have a Labmaster DMA, ports A and C come configured as
inputs (except Port C, bits 4-7). If you want to use all sixteen
binary outputs that Patchit offers, you will need to change a
setting on the Labmaster DMA motherboard (if you choose not to do
this, you will be limited to four binary outputs, 15-12). The
change that you need to make to the Labmaster DMA motherboard is to
reconfigure the rest of ports A and C for outputs (this change will
NOT affect pClamp). Reseat chips USS1, USS2 and USS4 so that they
are inserted in rows 2 and 4 (the same orientation as chip USS3).
Refer to your Labmaster DMA manual for this.
Triggering: An external trigger pulse should be applied to the
binary input port B, Bit 2 (B2). A rising edge trigger is expected
(i.e., going from logic low to logic high). In order to use an
external trigger, you must enable it in Patchit (see:
Config:Hardware Config:Tecmar Labmaster:Trigger Src.